local bufs = {{name = [===[Main]===],code=[===[
--# SpriteA1

-- Animation Sprites
-- Use this function to perform your initial setup
function setup()
    coordx={0,64,128,192,297,0,105,210,274,338}
    coordy={128,128,128,128,128,0,0,0,0,0}
    largeur={64,64,64,100,100,100,100,64,64,64}
    maxspr=10
    sprites={}
    chargeimage=false
    continue=false
    print("Wait please loading Image from Http...")
    http.request("http://img24.imageshack.us/img24/4205/1359677950595.jpg",didGetImage)

-------------------------- Thank West -------------------------------------------
    anim=1--a flag to state the current sprite image
    animmax=maxspr -- the number of sprite images
    animcount=1--a counter for the delay between swapping images
    parameter.integer("animdelay",1,531,65) -- the length of delay hence speed of animation
end

-- This function gets called once every frame
function draw()
    background()
    translate(WIDTH/8,HEIGHT/2)
    
    if chargeimage then 
        print("Load completed...")
        for i=1,maxspr do
            sprites[i]=matrice:copy(coordx[i],coordy[i],largeur[i],124)
        end 
        continue=true
        chargeimage=false
    end 
    
    if continue then
        for i=1,maxspr do
            if anim==i then
                w,h=spriteSize(sprites[i])
                sprite(sprites[i],WIDTH/2,130,w*2,h*2)
            end
            animcount = animcount + 1
            if animcount>animdelay then
                anim = anim + 1
                animcount=0
            end
            if anim>animmax then
                anim=1
            end
        end 
    end
end

function didGetImage(image)
    matrice=image
    saveImage('Documents:matrice',matrice)
    print(matrice)
    if spriteSize(matrice)==0 then
        print ("Download failure.....")
        setup()
    end
    chargeimage=true
end
]===]}}

for i=1, #bufs do 
    saveProjectTab(bufs[i].name,bufs[i].code) 
end 

print('SpriteA1 Installed!')